<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1-20130512"/>
<title>3D Cell: common.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">3D Cell
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1-20130512 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">common.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="common_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef COMMON_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define COMMON_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno"><a class="code" href="common_8h.html#accb3bfe9a092bc6458a159c78d12cb6a">    6</a></span>&#160;<span class="preprocessor">#define CELL_KEYRELEASE -1</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="code" href="common_8h.html#ab5cf1807981740666ef91eed40dd7318">    7</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SHIFT 0</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"><a class="code" href="common_8h.html#a589b955d919c335b879e83031fdd5f7b">    8</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_ALT 1</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="code" href="common_8h.html#a152704f78dd4f0155e50388b6ab19808">    9</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_DELETE 2</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="code" href="common_8h.html#a1b29fb8272fdcc44e1f8c917f5913484">   11</a></span>&#160;<span class="preprocessor">#define CELL_STOP -1</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="code" href="common_8h.html#a940a8e654763830f630c6b158d1253d2">   12</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_CAMERAMOVE 0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="code" href="common_8h.html#ad127931845b50333cdcaa02d12c4bf59">   13</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_CAMERAROTATE 1</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="code" href="common_8h.html#aa13d63218deaf54af6e0b849e8de3261">   14</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_CAMERAZOOM 2</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="code" href="common_8h.html#ab4c17b8c329d2b9c598c4791e124c8ac">   15</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SELECT 3</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="code" href="common_8h.html#a595d122334f6a8f0ae21597bbd6d0df7">   16</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_TRANSLATE 4</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="code" href="common_8h.html#a7ea573f952aea31d842440ea1faa4056">   17</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_ROTATE 5</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="code" href="common_8h.html#af054cff9a3c480c909afaa05eac3ea44">   18</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SCALE 6</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="code" href="common_8h.html#a76b6759a2daf85f9e8bf357d974a2aae">   19</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_EDITMESHPOINT 7</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="code" href="common_8h.html#a6b817de326b17821c76c401b57236176">   20</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_EDITMESHFACE 8</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="code" href="common_8h.html#ae85f6d0605420f6c2befe0954cd9272a">   22</a></span>&#160;<span class="preprocessor">#define CELL_PERSPECTIVE 0</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="code" href="common_8h.html#a4fcced87452d50451bd57a3f7b2d54b0">   23</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_FOURVIEW 1</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="code" href="common_8h.html#aee7a22bcf61538926f647691b3adb5a2">   24</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_TOP 2</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="code" href="common_8h.html#a7baacc40e7b72e7b96bd1ea9ec6ae7c9">   25</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_RIGHT 3</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="code" href="common_8h.html#a1f5321598e610b4e5852627f216101b6">   26</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_FRONT 4</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="code" href="common_8h.html#a439c54e03609dd66916e831c404a54d7">   27</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_PALNEBACED 5</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="code" href="common_8h.html#afb07badbfe97f652f81f9b65dbde6cc4">   29</a></span>&#160;<span class="preprocessor">#define CELL_TRIANGLE 0</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="code" href="common_8h.html#a8b5b2f8163bcf745c85c1a520627e7ce">   30</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_LINE 1</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="code" href="common_8h.html#a2901487a310b1c1b494cd6579bcbcec8">   31</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_POINT 2</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="code" href="common_8h.html#a42b8966d00e0fc8e4e39ffb0ac6bf968">   33</a></span>&#160;<span class="preprocessor">#define CELL_TRANSLATEAXISX 10000</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="code" href="common_8h.html#a7c6c8bbb900fc02b2c9271d0ff0cb519">   34</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_TRANSLATEAXISY 10001</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="code" href="common_8h.html#a4832f0abe6a656bd07283742466a9528">   35</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_TRANSLATEAXISZ 10002</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="code" href="common_8h.html#a7b5d4572a2b165c0b4c7e6729591f966">   36</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_TRANSLATEAXISXY 10003</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="code" href="common_8h.html#a1218b3ffa5792fd57eda61bf460f623a">   37</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_TRANSLATEAXISYZ 10004</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="code" href="common_8h.html#a721483dad58c83b9f62af79883497278">   38</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_TRANSLATEAXISZX 10005</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="code" href="common_8h.html#af81301904f39c4d02a6f7228f8e21a5e">   39</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_ROTATEAXISX 10006</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="code" href="common_8h.html#ad9ac87d3c99ed5df7d955468d28759cc">   40</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_ROTATEAXISY 10007</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="code" href="common_8h.html#a735ab541583cb0c8407e9bf1b9878ad4">   41</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_ROTATEAXISZ 10008</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="code" href="common_8h.html#a3605965de4b9c7f76da89ac5b8386da5">   42</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SCALEAXISX 10009</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="code" href="common_8h.html#af9f56e9a31eda940bcf5d250745611b5">   43</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SCALEAXISY 10010</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="code" href="common_8h.html#a0273b51a3bf011a5773336d4c38f83e1">   44</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SCALEAXISZ 10011</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="code" href="common_8h.html#ae7976a4f7dd0456bc8dd2c284c747763">   45</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SCALEAXISXYZ 10012</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="code" href="common_8h.html#a283d7c0933da61a6e63a06b5aa3b6c78">   47</a></span>&#160;<span class="preprocessor">#define CELL_NOPAINT -1</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="code" href="common_8h.html#a9c7ef181a2761bfe33850c7cd305295c">   48</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_LIQUIDFY 0</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="code" href="common_8h.html#a5e078f65b26c2668eb3f396f6b5beee8">   50</a></span>&#160;<span class="preprocessor">#define CELL_FOURVIEWMARGIN 5</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="code" href="common_8h.html#aeca034f67218340ecb2261a22c2f3dcd">   52</a></span>&#160;<span class="preprocessor">#define BUFSIZE 512</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="code" href="common_8h.html#abf7ed52f2b67d87e264c2936ae3a6b62">   54</a></span>&#160;<span class="preprocessor">#define CELL_EPS 10e-8</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="common_8h.html#a52544ecf9eb10c405b059a79813e726b">   55</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_MAX 100000000.0</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="code" href="common_8h.html#a7865d2da3ef8c1e41e0867a894c70242">   57</a></span>&#160;<span class="preprocessor">#define CELL_NONE -1</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="code" href="common_8h.html#a6037b21d2b8dfd0bd7bdd02e8a9b8484">   58</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_MESH 0</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="code" href="common_8h.html#a7aa4fe7e067f5ee1ee27f4bae4c40bc6">   59</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_SPHERE 1</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="code" href="common_8h.html#a03861be5ac13a4eab691f81205d0a2b1">   60</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_CYLINDER 2</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="code" href="common_8h.html#ac67d653a5fc377e59931f04d46f0bb72">   61</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_CUBE 3</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="code" href="common_8h.html#a4a6820b982c2bad994b872b055d1c057">   62</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_PLANE 4</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="code" href="common_8h.html#ae805e2699836c2557f28da863e245958">   63</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_OPENCYLINDER 5</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="code" href="common_8h.html#a74f7ee886558f57f7c3b4aec7c31af63">   65</a></span>&#160;<span class="preprocessor">#define CELL_OPENGLOFFSETX 62</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="code" href="common_8h.html#a045face6cf6ac4fbd8cb6c59ab25f0da">   66</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define CELL_OPENGLOFFSETY 97</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="code" href="class_vector3.html">   73</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;{</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4">   77</a></span>&#160;    <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>() {<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a> = <a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a> = <a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> = 0.0f;}</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="code" href="class_vector3.html#a61caf3c2269cee584e55c84a6ec0a475">   86</a></span>&#160;    <a class="code" href="class_vector3.html#a61caf3c2269cee584e55c84a6ec0a475" title="A constructor. ">Vector3</a>(<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b, <span class="keywordtype">double</span> c) : <a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>(a), <a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>(b), <a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>(c){ }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="code" href="class_vector3.html#a5160793db4ed4c3ba3becc89f5af3bee">   94</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_vector3.html#a5160793db4ed4c3ba3becc89f5af3bee" title="Set values. ">Set</a>(<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b, <span class="keywordtype">double</span> c) {<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a> = a; <a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a> = b; <a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> = c;}</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="code" href="class_vector3.html#af14c1570f3ac79f1ab8f09cc3200b51b">  100</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_vector3.html#af14c1570f3ac79f1ab8f09cc3200b51b" title="Get the lenght of a vector. ">Lenght</a>() {<span class="keywordflow">return</span> sqrt(<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a> + <a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a> + <a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>);}</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="code" href="class_vector3.html#a9c94cc16049543fc8edaba52c2b266b7">  103</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_vector3.html#a9c94cc16049543fc8edaba52c2b266b7" title="Normalize a vector. ">Normalize</a>() {<span class="keywordtype">float</span> l = 1.0/<a class="code" href="class_vector3.html#af14c1570f3ac79f1ab8f09cc3200b51b" title="Get the lenght of a vector. ">Lenght</a>(); <a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a> = <a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*l; <a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a> = <a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*l; <a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> = <a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*l;}</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="code" href="class_vector3.html#a72a36c71164f1532d24ec49c3d7056fc">  109</a></span>&#160;    <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#a72a36c71164f1532d24ec49c3d7056fc" title="Get -v;. ">operator- </a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>( -<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>, -<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>, -<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> ); }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="code" href="class_vector3.html#ab7e44563aab6a2c1231aee03ca792b9a">  117</a></span>&#160;    <span class="keyword">friend</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#ab7e44563aab6a2c1231aee03ca792b9a" title="Get v1+v2. ">operator + </a>( <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v2 ) { <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>( v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a> + v2.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>, v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a> + v2.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>, v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> + v2.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> ); }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="code" href="class_vector3.html#af6a71d8f6c8d21c22d4025faa286d396">  125</a></span>&#160;    <span class="keyword">friend</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#a72a36c71164f1532d24ec49c3d7056fc" title="Get -v;. ">operator - </a>( <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v2 ) { <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>( v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a> - v2.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>, v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a> - v2.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>, v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> - v2.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> ); }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="code" href="class_vector3.html#a8eb7b80968ff52ad83d1010fc717fd50">  133</a></span>&#160;    <span class="keyword">friend</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#a8eb7b80968ff52ad83d1010fc717fd50" title="Get v1*v2. ">operator * </a>( <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v2 ) { <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>( v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*v2.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>, v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*v2.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>, v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*v2.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a> ); }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="code" href="class_vector3.html#ab27ca5627cbe91c355b16a323e6ef1ca">  141</a></span>&#160;    <span class="keyword">friend</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#a8eb7b80968ff52ad83d1010fc717fd50" title="Get v1*v2. ">operator * </a>( <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <span class="keywordtype">float</span> t ) { <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>(v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*t, v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*t, v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*t ); }</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="code" href="class_vector3.html#a6d1842ad958eba8bc7ec9de0c46e3d7d">  149</a></span>&#160;    <span class="keyword">friend</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#a8eb7b80968ff52ad83d1010fc717fd50" title="Get v1*v2. ">operator * </a>( <span class="keyword">const</span> <span class="keywordtype">float</span> t, <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1 ) { <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>(v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*t, v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*t, v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*t ); }</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="code" href="class_vector3.html#a47e8c3cc81129fb021e68339f3be06f4">  157</a></span>&#160;    <span class="keyword">friend</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#a47e8c3cc81129fb021e68339f3be06f4" title="Get v1/t. ">operator / </a>( <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <span class="keywordtype">float</span> t ) { <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>(v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>/t, v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>/t, v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>/t ); }</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div>
<div class="line"><a name="l00165"></a><span class="lineno"><a class="code" href="class_vector3.html#a41f163265cb2926e79b8e26fa8fc06d8">  165</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="class_vector3.html#a41f163265cb2926e79b8e26fa8fc06d8" title="Reture v1==v2. ">operator == </a>( <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v2 ) { <span class="keywordflow">return</span> (v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>==v2.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>&amp;&amp;v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>==v2.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>&amp;&amp;v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*v2.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>); }</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="code" href="class_vector3.html#ab271ae54719908906f1acf4d60668547">  173</a></span>&#160;    <span class="keyword">friend</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a> <a class="code" href="class_vector3.html#ab271ae54719908906f1acf4d60668547" title="Get cross product. ">Cross</a>(<span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v2) { <span class="keywordflow">return</span> <a class="code" href="class_vector3.html#a0f49191f7e001e7f7ae1cb49522118b4" title="A constructor. ">Vector3</a>( v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*v2.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>-v2.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>, v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*v2.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>-v2.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>, v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*v2.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>-v2.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a> ); }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="code" href="class_vector3.html#a7dbfb016a8ed359b7d287c964b26f274">  181</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">float</span> <a class="code" href="class_vector3.html#a7dbfb016a8ed359b7d287c964b26f274" title="Get dot product. ">Dot</a>(<span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="class_vector3.html" title="A Vector3 class. ">Vector3</a>&amp; v2) { <span class="keywordflow">return</span> v1.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>*v2.<a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>+v1.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>*v2.<a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>+v1.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>*v2.<a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>; }</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno"><a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d">  184</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_vector3.html#a60aa84ebc037dec9faba617f8ddb231d" title="x coordinate value. ">x</a>;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459">  187</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_vector3.html#ae4965693beffdb6069e0618222cae459" title="y coordinate value. ">y</a>;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff">  190</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_vector3.html#aa5f4108b2839a110eeaec8606780eaff" title="z coordinate value. ">z</a>;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;};</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor">#endif // COMMON_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 9 2013 15:49:57 for 3D Cell by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1-20130512
</small></address>
</body>
</html>
